package com.small.xx.ai.file.entity;

import java.time.LocalDateTime;

/**
 * 文件信息实体类
 * 
 * @author xx-ai
 * @version 1.0.0
 */
public class FileInfo {
    
    /**
     * 文件名
     */
    private String name;
    
    /**
     * 文件完整路径
     */
    private String path;
    
    /**
     * 文件大小（字节）
     */
    private Long size;
    
    /**
     * 是否为目录
     */
    private Boolean isDirectory;
    
    /**
     * 文件扩展名
     */
    private String extension;
    
    /**
     * 最后修改时间
     */
    private LocalDateTime lastModified;
    
    /**
     * 是否可读
     */
    private Boolean readable;
    
    /**
     * 是否可写
     */
    private Boolean writable;
    
    /**
     * 父目录路径
     */
    private String parentPath;

    // 构造器
    public FileInfo() {}

    public FileInfo(String name, String path, Long size, Boolean isDirectory) {
        this.name = name;
        this.path = path;
        this.size = size;
        this.isDirectory = isDirectory;
    }

    // Getter和Setter方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Boolean getIsDirectory() {
        return isDirectory;
    }

    public void setIsDirectory(Boolean isDirectory) {
        this.isDirectory = isDirectory;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public LocalDateTime getLastModified() {
        return lastModified;
    }

    public void setLastModified(LocalDateTime lastModified) {
        this.lastModified = lastModified;
    }

    public Boolean getReadable() {
        return readable;
    }

    public void setReadable(Boolean readable) {
        this.readable = readable;
    }

    public Boolean getWritable() {
        return writable;
    }

    public void setWritable(Boolean writable) {
        this.writable = writable;
    }

    public String getParentPath() {
        return parentPath;
    }

    public void setParentPath(String parentPath) {
        this.parentPath = parentPath;
    }

    @Override
    public String toString() {
        return "FileInfo{" +
                "name='" + name + '\'' +
                ", path='" + path + '\'' +
                ", size=" + size +
                ", isDirectory=" + isDirectory +
                ", extension='" + extension + '\'' +
                ", lastModified=" + lastModified +
                ", readable=" + readable +
                ", writable=" + writable +
                ", parentPath='" + parentPath + '\'' +
                '}';
    }
}